package com.iscas.dataaggregation.domain.experiment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName plan
 */
@TableName(value ="plan")
@Data
public class Plan implements Serializable {
    /**
     * 计划id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 计划名称
     */
    private String name;

    /**
     * 计划创建时间
     */
    private Date create_time;

    /**
     * 计划更新时间
     */
    private Date update_time;

    /**
     * 场景描述
     */
    private String scene_desc;

    /**
     * 计划预期
     */
    private String expection;

    /**
     * 流程图id
     */
    private Integer workflow_id;

    /**
     * 创建人id
     */
    private Integer creator_id;

    /**
     * 压测文件内容
     */
    private String press_content;

    /**
     * 周期执行
     */
    private String schedule;

    /**
     * 流程图数据
     */
    private String graph;

    /**
     * 计划开始时间
     */
    private Date start_time;

    /**
     * 计划结束时间
     */
    private Date end_time;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Plan other = (Plan) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getUpdate_time() == null ? other.getUpdate_time() == null : this.getUpdate_time().equals(other.getUpdate_time()))
            && (this.getScene_desc() == null ? other.getScene_desc() == null : this.getScene_desc().equals(other.getScene_desc()))
            && (this.getExpection() == null ? other.getExpection() == null : this.getExpection().equals(other.getExpection()))
            && (this.getWorkflow_id() == null ? other.getWorkflow_id() == null : this.getWorkflow_id().equals(other.getWorkflow_id()))
            && (this.getCreator_id() == null ? other.getCreator_id() == null : this.getCreator_id().equals(other.getCreator_id()))
            && (this.getPress_content() == null ? other.getPress_content() == null : this.getPress_content().equals(other.getPress_content()))
            && (this.getSchedule() == null ? other.getSchedule() == null : this.getSchedule().equals(other.getSchedule()))
            && (this.getGraph() == null ? other.getGraph() == null : this.getGraph().equals(other.getGraph()))
            && (this.getStart_time() == null ? other.getStart_time() == null : this.getStart_time().equals(other.getStart_time()))
            && (this.getEnd_time() == null ? other.getEnd_time() == null : this.getEnd_time().equals(other.getEnd_time()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getUpdate_time() == null) ? 0 : getUpdate_time().hashCode());
        result = prime * result + ((getScene_desc() == null) ? 0 : getScene_desc().hashCode());
        result = prime * result + ((getExpection() == null) ? 0 : getExpection().hashCode());
        result = prime * result + ((getWorkflow_id() == null) ? 0 : getWorkflow_id().hashCode());
        result = prime * result + ((getCreator_id() == null) ? 0 : getCreator_id().hashCode());
        result = prime * result + ((getPress_content() == null) ? 0 : getPress_content().hashCode());
        result = prime * result + ((getSchedule() == null) ? 0 : getSchedule().hashCode());
        result = prime * result + ((getGraph() == null) ? 0 : getGraph().hashCode());
        result = prime * result + ((getStart_time() == null) ? 0 : getStart_time().hashCode());
        result = prime * result + ((getEnd_time() == null) ? 0 : getEnd_time().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", create_time=").append(create_time);
        sb.append(", update_time=").append(update_time);
        sb.append(", scene_desc=").append(scene_desc);
        sb.append(", expection=").append(expection);
        sb.append(", workflow_id=").append(workflow_id);
        sb.append(", creator_id=").append(creator_id);
        sb.append(", press_content=").append(press_content);
        sb.append(", schedule=").append(schedule);
        sb.append(", graph=").append(graph);
        sb.append(", start_time=").append(start_time);
        sb.append(", end_time=").append(end_time);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}